﻿<%@ Page Language="C#" MasterPageFile="~/aspnet/admin/ForValidation.master" AutoEventWireup="true" CodeFile="CX_Collect_Replace.aspx.cs" Inherits="aspnet_admin_bock_collect_CX_Collect_Replace" Title="Untitled Page" %>
<%@ Register Assembly="web表单验证控件" Namespace="CheckForm" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    &nbsp;
    <table align="center" border="0" cellpadding="2" cellspacing="1" class="border"
        height="116" width="100%">
        <tr align="center">
            <td class="topbg" colspan="2" style="height: 30px">
                <strong>添加采集替换关键字</strong></td>
        </tr>
        <tr>
            <td class="tdbg" colspan="2" style="height: 27px">
                提示信息:<asp:Label ID="tt" runat="server" CssClass="font-4"></asp:Label></td>
        </tr>
        <tr>
            <td class="tdbg" style="height: 27px" width="223">
                添加名称:(50字以内)</td>
            <td class="tdbg" style="height: 27px; width: 787px;">
                <asp:TextBox ID="Cx_Collect_Relace_Name" runat="server" MaxLength="50"></asp:TextBox></td>
        </tr>
        <tr>
            <td class="tdbg" style="height: 7px" width="223">
                替换关键字内容;</td>
            <td class="tdbg" style="width: 787px; height: 7px">
                <asp:TextBox ID="Cx_Collect_Relace_Contont" runat="server" Height="19px" Width="352px"></asp:TextBox></td>
        </tr>
        <tr>
            <td class="tdbg" colspan="2" style="height: 27px">
                <center>
                    <asp:Button ID="Button1" runat="server" Text="确定" OnClick="Button1_Click" /></center>
            </td>
        </tr>
    </table>
    <br />
    <asp:GridView id="GridView1" runat="server" CssClass="border" AllowPaging="True" PageSize="200" CellPadding="3" EmptyDataText="没有数据" Width="100%" AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="CX_Collect_Replace_id"
 DataSourceID="SqlDataSource1"  OnRowDataBound="GridView1_RowDataBound"><Columns>
     <asp:BoundField DataField="CX_Collect_Replace_id" HeaderText="采集替换关键字编号"
         InsertVisible="False" ReadOnly="True" SortExpression="CX_Collect_Replace_id">
                                      <ItemStyle CssClass="tdbg" />
            <HeaderStyle CssClass="topbg" Height="30px" HorizontalAlign="Center" />
        </asp:BoundField>
     <asp:BoundField DataField="Cx_Collect_Relace_Name" HeaderText="替换关键字名称"
         SortExpression="Cx_Collect_Relace_Name" >                             <ItemStyle CssClass="tdbg" />
            <HeaderStyle CssClass="topbg" Height="30px" HorizontalAlign="Center" />
        </asp:BoundField>
     <asp:BoundField DataField="Cx_Collect_Relace_Contont" HeaderText="替换内容"
         SortExpression="Cx_Collect_Relace_Contont" >
                             <ItemStyle CssClass="tdbg" />
            <HeaderStyle CssClass="topbg" Height="30px" HorizontalAlign="Center" />
        </asp:BoundField>
     <asp:TemplateField ShowHeader="False">
         <EditItemTemplate>
             <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" CommandName="Update"
                 Text="更新"></asp:LinkButton>
             <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Cancel"
                 Text="取消"></asp:LinkButton>
         </EditItemTemplate>
         <ItemStyle CssClass="tdbg" />
         <HeaderStyle CssClass="topbg" Height="30px" HorizontalAlign="Center" />
         <ItemTemplate>
             <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" CommandName="Edit"
                 Text=" 编辑"></asp:LinkButton>
             <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" CommandName="Delete"
                 Text=" 删除"></asp:LinkButton>
         </ItemTemplate>
     </asp:TemplateField>
    

</Columns>

<PagerStyle CssClass="tdbg" HorizontalAlign="Center" Font-Size="9pt" Font-Underline="False"></PagerStyle>
</asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConflictDetection="CompareAllValues"
        ConnectionString="<%$ ConnectionStrings:SqlConn %>" DeleteCommand="DELETE FROM [CX_Collect_Replace] WHERE [CX_Collect_Replace_id] = @original_CX_Collect_Replace_id AND [Cx_Collect_Relace_Name] = @original_Cx_Collect_Relace_Name AND [Cx_Collect_Relace_Contont] = @original_Cx_Collect_Relace_Contont"
        InsertCommand="INSERT INTO [CX_Collect_Replace] ([Cx_Collect_Relace_Name], [Cx_Collect_Relace_Contont]) VALUES (@Cx_Collect_Relace_Name, @Cx_Collect_Relace_Contont)"
        OldValuesParameterFormatString="original_{0}" SelectCommand="SELECT * FROM [CX_Collect_Replace]"
        UpdateCommand="UPDATE [CX_Collect_Replace] SET [Cx_Collect_Relace_Name] = @Cx_Collect_Relace_Name, [Cx_Collect_Relace_Contont] = @Cx_Collect_Relace_Contont WHERE [CX_Collect_Replace_id] = @original_CX_Collect_Replace_id AND [Cx_Collect_Relace_Name] = @original_Cx_Collect_Relace_Name AND [Cx_Collect_Relace_Contont] = @original_Cx_Collect_Relace_Contont">
        <DeleteParameters>
            <asp:Parameter Name="original_CX_Collect_Replace_id" Type="Decimal" />
            <asp:Parameter Name="original_Cx_Collect_Relace_Name" Type="String" />
            <asp:Parameter Name="original_Cx_Collect_Relace_Contont" Type="String" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="Cx_Collect_Relace_Name" Type="String" />
            <asp:Parameter Name="Cx_Collect_Relace_Contont" Type="String" />
            <asp:Parameter Name="original_CX_Collect_Replace_id" Type="Decimal" />
            <asp:Parameter Name="original_Cx_Collect_Relace_Name" Type="String" />
            <asp:Parameter Name="original_Cx_Collect_Relace_Contont" Type="String" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="Cx_Collect_Relace_Name" Type="String" />
            <asp:Parameter Name="Cx_Collect_Relace_Contont" Type="String" />
        </InsertParameters>
    </asp:SqlDataSource>
</asp:Content>


